<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: cornflowerblue;
        }

        .DIV {
            width: 303px;
            height: 301px;
            margin: 50px auto;
            position: relative;
            overflow: hidden;
        }

        .A,
        .B {
            position: absolute;
            width: 303px;
            height: 301px;
            backface-visibility: hidden;
            transition: transform 2s;
        }

        .A {
            background: url(https://img.haruka.net.cn/image/2024/10/24/hfmwex.png) left 0 no-repeat;
            transform: rotateY(0deg);
        }

        .B {
            background: url(https://img.haruka.net.cn/image/2024/10/24/hfmwex.png) right 0 no-repeat;
            transform: rotateY(180deg);
        }

        .DIV:hover .A {
            transform: rotateY(180deg);
        }

        .DIV:hover .B {
            transform: rotateY(0deg);
        }
    </style>
</head>

<body>
    <div class="DIV">
        <div class="A"></div>
        <div class="B"></div>
    </div>
</body>

</html>